import asyncio


class Looper(object):
    def __init__(self):
        self.loop = asyncio.get_event_loop()

    def run(self, tasks):
        print('run', tasks)
        self.loop.run_until_complete(tasks)

    def close(self):
        self.loop.close()
